package com.yanqu.road.server.cmd.activity.shuihuyezicard;

import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.activity.shuihuyezipai.ShuiHuYeZiCardActivityBattleMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.CrossProtocol;

/**
 * @Description
 * @Author cwq
 * @Data 2021/12/24 16:40
 */
@Cmd(code = CrossProtocol.C_CROSS_SHUIHUYEZICARD_PVP_OFFLINE, desc = "水浒叶子牌 玩家离线")
public class CrossShuiHuYeZiCardOfflineCmd extends CrossCommand {

    long userId;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        userId = packet.getPlayerId();
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        ShuiHuYeZiCardActivityBattleMgr.offline(userId);
    }

    @Override
    public void sendData() {

    }
}
